import request from './request'

export const getlockrules = (page, limit, data) => {
  // console.log(data)
  return request({
    url: `/lockrule/paging/${page}/${limit}`,
    method: 'POST',
    headers: {
      token: localStorage.getItem('token') || ''
    },
    data
  })
}

export const addrules = (data) => {
  return request({
    url: '/lockrule/add',
    method: 'POST',
    headers: {
      token: localStorage.getItem('token') || ''
    },
    data
  })
}

export const RuleUpdateById = (userBody) => {
  return request({
    url: '/lockrule/update',
    method: 'PUT',
    headers: {
      token: localStorage.getItem('token') || ''
    },
    data: userBody
  })
}

export const deleteRule = (lockclassid) => {
  return request({
    url: `/lockrule/delete/${lockclassid}`,
    method: 'DELETE',
    headers: {
      token: localStorage.getItem('token') || ''
    }
  })
}
